from flask import Flask, redirect, url_for

app = Flask(__name__)


@app.route('/')
def hello_admin():
    return 'Hello World!'

@app.route('/guest/<guest>')
def hello_user(guest):
    return f'Hello {guest}!'

@app.route('/user/<name>')
def hello_name(guest):
    if guest == 'admin':
        return redirect(url_for('hello_admin'))
    else:
        return redirect(url_for('hello_user', guest))

if __name__ == '__main__':
    app.run(debug=True)